package LookupUtil;

import java.io.IOException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import LoginUtil.ConnectionManager;

/**
 * Servlet implementation class PatientLookupServlet
 */
public class PatientLookupServlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
	   Statement stmt = null; 
	   String lookup = "";
	   ResultSet rs = null;
	   
	   Connection currentCon = ConnectionManager.getConnection();
	   try 
	      {
	    	  stmt=currentCon.createStatement();
		      int rows = stmt.executeUpdate(lookup);
	      }
	      catch (SQLException e) {
			e.printStackTrace();
		}
	      
	      finally 
		   {
		      if (rs != null)	{
		         try {
		            rs.close();
		         } catch (Exception e) {}
		            rs = null;
		         }
			
		      if (stmt != null) {
		         try {
		            stmt.close();
		         } catch (Exception e) {}
		            stmt = null;
		         }
			
		      if (currentCon != null) {
		         try {
		            currentCon.close();
		         } catch (Exception e) {
		         }
		
		         currentCon = null;
		      }
		   }

}

}
